﻿namespace Play
{
    public class NimMove
    {
        public readonly int HeapIndex;
        public readonly int Pieces;

        public NimMove(int heapIndex, int pieces)
        {
            HeapIndex = heapIndex;
            Pieces = pieces;
        }

        public override string ToString()
        {
            var heapStr = (HeapIndex + 1);//since we reffer heap[0] as heap #1
            return string.Format(@"Move=[take {0} pieces from heap #{1}] ", Pieces, heapStr);
        }
    }
}